* make all the SAS-formatted buffer shapefiles at plant level;

libname shpfi  '/projects/users/########/Snapshot2022/IntermediateData/Shapefiles';
libname ben '/projects/users/########';

%macro sas_shapes;
  %let dists = 20 40 60 80 100;
  %local I next_dist;
  %let I = 1;
  %do %while (%scan(&dists, &I) ne );
    %let next_dist = %scan(&dists, &I);
      *import US shapefile;
      PROC MAPIMPORT OUT= shpfi.USmile&next_dist.p
	DATAFILE= "/projects/users/########/Snapshot2022/IntermediateData/Shapefiles/&next_dist.mileUSp.shp" create_ID_;
      RUN;
    %let I = %eval(&I + 1);
  %end;
%mend;

%sas_shapes;
